package com.deyuanyun.pic.pbf.mapper;

import com.deyuanyun.pic.pbf.domain.*;
import com.deyuanyun.pic.wf.domain.ProcessDefinition;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 非内检测维修记录持久层
 * @author lijun
 * @date 2016-06-25
 * 
 * History: [修改人][时间][修改描述]
 */
public interface ExternalRepairMapper {
    /**
     * 通过缺陷ID查询防腐层修复信息
     * @param defectId  缺陷ID
     * @return
     */
    public CoatRepair queryRepairCoatByDefectId(@Param("defectId")String defectId);
    /**
     * 通过缺陷ID查询复合材料补强修复记录
     * @param defectId  缺陷ID
     * @return
     */
    public RepairComposites queryRepairCompositesByDefectId(@Param("defectId") String defectId);
    /**
     * 通过缺陷ID查询钢质环氧套筒补强修复记录
     * @param defectId  缺陷ID
     * @return
     */
    public RepairEpoxySleeve queryRepairEpoxySleeveByDefectId(@Param("defectId")String defectId);
    /**
     * 通过缺陷ID查询A，B型套筒补强修复记录
     * @param defectId  缺陷ID
     * @return
     */
    public RepairABTypeSleeve queryRepairABTypeSleeveByDefectId(@Param("defectId")String defectId);
    /**
     * 通过缺陷ID查询换管记录
     * @param defectId  缺陷ID
     * @return
     */
    public RepairReplacePipe queryRepairReplacePipeByDefectId(@Param("defectId")String defectId);
    /**
     * 通过换管ID查询焊接信息
     * @param replacePipeId 换管ID
     * @return 焊接信息
     */
    public RepairPipeWelding queryRepairPipeWeldingByReplacePipeId(@Param("replacePipeId")String replacePipeId);
    /**
     * 通过焊接ID查询焊缝信息
     * @param weldingId  焊接ID
     * @return
     */
    public List<RepairPipeWeld> queryRepairPipeWeldByWeldingId(@Param("weldingId")String weldingId);
    /**
     * 通过缺陷ID查询其他修复记录
     * @param defectId  缺陷ID
     * @return
     */
    public RepairOtherVO queryRepairOtherByDefectId(@Param("defectId")String defectId);
    /**
     * 增加非内检缺陷和维修记录的对应数据
     */
    public int repairRcordAndDefectCreate(repairRecordDefectVO repairAndDefect);
    /**
     * 通过缺陷Id查询修复流程
     * @param defectId
     * @return
     */
    public ProcessDefinition queryRepairNameByDefectId(@Param("defectId")String defectId);
}
